Fix bad hash detection