small changes to compile in gfortran