mode switching fixes