Fixed conversion from Rational to int for rationals with large numerator or denominator.