Changed logic fail in [de]serialization methods.