stop the infinite loop