Fix deserialization bug