I think that the loop is fixed, there was some weird coppying of code
I took it out and put back my original logic