fix error parsing  XML document