fix int/long bug in rational module