Fixed the before and after destroy callbacks, and add the specs. [#80441132]