fixed test for while statement