Fixed typo. Fixed while condition.