Added support for switching queues