Added in logic to only update if the value has changed