Fix bug in hashtable creation