Make hamming test more robust (again)