Fixed missing job_state entry into db