Bad check on matching hash function