Fixing problem with pagination of search results.