main controller fix