fix bugs in pagination and pagination_rewrite
Merge branch 'eng.local' into master.eng