Correct error in mainController