task manager and factory worker fixes