bug fix, reset search_page and end_of_page