Problems with switching mode

try this: