cleanup in action hooks