before_collapse