fixing deserialization errors