Fix reference errors in xml files