Fix implicit conversion of double to float