Forgot to fix loop condition from previous commit