try to fix thread bug