Fixed bug with updating job status