Fixing serialization issues.