Fix and comment replaceText