Sort out patch order.