fix mainController