Fixed problem when delete queue is empty