fix binary tree dict