Fixed while conditions.