Modified the destructor