Fix teamswitch logic.