Critical fix, do not free data before removing it from the tree.