fix broken "while"