added locking for job update