Hashtable tests and fixes