Fixed "changeMode" functionality