Fixed double casting to floats