fix a few things that breaks gfortran