fixing XML parsing