MainCtrl bug fixed