correct error in mainController