Fix implicit conversion from double to float