fix thread