Fix maintype.