Fixed name of function in main controller