Correct loop iterations.