Fixing serialization error