small fixes in codebook