fixed threads exit