Fix paging for new encoding