fix ticket #3121 Pagination