Fix the loop