queue error resolved

Fixed error in queue regarding premature shutdown with contents still in
queues.