Get rid of infinite while completely