Fix main controller