DG: Added missing terminate function for jobs.