Fix XML generation.