Fix floating point issue