Made triangle-inequality work again