try to stop infinite loop