Add sorting for rationals