Add ordering so that the queue is ordered in the correct way