handle empty queue