Fix bugs in hash table.