fixing search/replace errors