Fixing serialization