fix hashtable mem-alloc bug