switch mode fixed
even better fix for switch modes
supervisor adding logic