I think I’ve got it… at least it seems to work. The problem was the “ForEach Loop”…it seems to has memory. It remembers the previous object type. This was causing the errors. So I deleted it and put a new one. So I modified the algorithm a bit and I think it will work with any type of class.
Thank you very much for your help!!
Very appreciated!!