Change mode when mode selector changes