remove useless infinite loop from end of exit function