Eliminate infinite loop in a while.