Moving the mode switching earlier on