Added handling for when there are 0 items in the queue