Fix XML structure