bug with empty queues