Fix to search directive