fix double precision cast warnings