Fix the deletion of queues