Serialisation tests and fix to work w/ XML