Compact the queue