fixed the task queues using unique_ptrs