Fixed queue saving bug

- Fixed bug where queue file will not be saved if there is no item in
the queue leaving the previous queue items still in the queue file.