Small fix for mode switch.