Updated some conditional statements to be compatible with gfortran