fix hashtable implementation