Fixing double-collapsing issue