Correcting Double to Float conversion