another fix in the loop