Fix assertion in queues.dequeue
Merge pull request #1223 from Varriount/queues/fix-assertion

Fix assertion in queues.dequeue