Fix for loop