Make sort stable