bug fix to tree-map