Fixed a destructor bug in Type* classes