fix exit thread