Fix while statement precidence