Fixed redundant code, and null error in job.py related to retrying a job