more codebook fixes