Improving mode switching