Fixed the hash function for cases like [0, 0]