Fix floating point errors.