while loop condition wrong? holy