fix handling of search expressions