Add splice to be able to empty the queue