fix to the codebook