Fixing text/comment node handling.