fix unmarshalling