Fixed compiler warnings around implicit conversions losing floating-point precision