fix expand_contract_toggle behavior