Fixed up hash function.