Removed unused line
Fixed looping