Fix XML parsing