fixed queues allocation sproc where all queues were updated