fixed incrementing issue

for loop