Fix ThreadManager