fix paging when the page number > 8