Fix XML and references