fix refactoring bug in the search dialog