Debugged pagination to work with long search results, without clearing search