simplified the destructor hook for bindings