fix bug with model-data serialization