fixed the memory leak of the hash table