Fix bug in updating job with unique_key