fix text nodes on element trees