Fix getHash function