Fixed incorrect corner behaviour for the search.