Added queues to allow handler to unregister safely.