Various Fortran fixes