Fix naive search and replace errors