fix error when attempting to set a field that is not writable