Added a hook to deletion.