unbreak trie generation for 1st order models