fix error when toggling lists