Fix pagenavi's bug.