Add sorting back for rationals