removed case of infinite loop