fix preserve_on_error AttributeError, copy/paste error