Bug fixing on Hamming Distance code