GLM2 grid fix. (first job to finish did cancel the whole grid. Added checking for whether or not the job is running inside a grid job or not).