fix thread stop