BugFix: Thread termination