Fixing mistakes in codebook