fixing serialization