Corrected destructor in model