Bug fix: after reallocating the hash table, we have to re-insert each value