Added missing context checking in ThreadManager.