fixes issues with collapsable states