Fix: don't switch mode twice