Fix while continuous loop