bug fix at ParseWhile