fix bug in requeue: The queue was never emptied