Fixing serialization of aggregates