Fix search and replace scripts