Update: Trie seems to be correct now :)