fix for parsing text nodes