Logic fix for hashes.
Further hash function revisions.