Trie bug fixing

Change-Id: I71a4c3c90b5b3361268cf0d62522f269b3475c9f