Fixed indexes on tasks
Logging for unhandled exceptions
Lock while handling control messages