Add support for multiple queues.