fixed collapseTandems so it actually works