fix error when only one page of search result