fix field order in codebook