fixing serialization issues