Bad search and replace correction