add missing offset/limit code