fix delete in destructor