Added hook to remove settings after the resource is deleted