fix an issue with saving collapsable states