Refactoring, correct selection after keyboard search.