Fix bug related to cleaning of successful jobs.