fix MainController