Protect hamming against incorrect implementation