fix thread hiding bug