Bugs causing rounding error and wrong metric for tees with only one node fixed