Fix search/replace issues