fixed a bug caused by force-shut down