Restoring of Collapsible States

Fixes #2030