Fix global string replacement