issue # 2: sign extension in HashFn may cause out-of-range array accesses