fix hashtable performance issues