Improve the pagination