fixes main controller