fix offsetSet behavior in resource