Error fixes for xmlparser