Fixed dumb issue with loop iteration