Rebuild pagination