FOund a cleaner way to solve the dead thread issue.