fix for some single/double precision issues in the Fortran portion of the code