fix for loop