use before destroy call back