fix bugs that pager can't show all the pages.