Fixed various bugs in xml-classes.