fixed some hash functions