fixed the collection of nodes in huffman trie, haven't checked for leak