fix ptr_dtor bug