fix tdelete to properly balance the tree