Switch mode bug fix
switch mode bug fix