deselect a queue when there are no more queues

[#81]