Fix mainctrl definition.