Fixed branching in XMLDescriptor
Fixed tests