Independent grid for loop fix