fixed a bug in Trie