Fix broken s/...//g refactoring