Fixed compiler warnings for destructor