fix typo (splice instead of slice), collapseMode change is not needed anymore now