fix to support offsetExists in resources