fixed XmlReader bugs