Bug fixes and make BucTrie work with the original implementation