Fix issue with removal of a job with related tasks