Fix for loop format