Fix hash function returning nil.