Fix duplicated and missing cases in type declaration.