fix ordering of search