removing potential infinite loop