Solves problem with non empty queue when the uploads have finished