Replaced type FlagBits with int and aligned flag bits with flags in gomas package.