fix incorrect check for numerator fitting into 32-bit integer