Correct loop bounds (once more)