fix thread locK