fix bug in hash table lookup