string replacement fix