fixes to hamming kernel