fix xml unmarshalling bugs