fixed typo in hash function