minor bug with loop