fixing bits in key.pp