handle empty queues