fixing a bug only visible when compiling with parallel netcdf enabled