fix unmarshalling with a global