fix a float to double conversion warning