on_close set running to false