Fix deserialization bug for legacy items