onCollapse method order change