remove infinite loop