Fixed bug that considered queues with endings alike to be the same