Fixed problems with switching to queues