fixed replacements containing only text nodes