fixes to XML marshalling