Use better functions for AutoCollapse.