Make the inner loop consistent with the outer