Fix a loop