fix thread not complete