fix odd update on codebook