Fix one infinite loop