Fixed problem in MainController