a_search is now smart enough to wait until last search is done before selecting