fixed parsing of text content