fix a bug where we unswitched the wrong way