Fix XML element structure