fix update job status function