Fixed various bugs in the hashtable.