cleanup linkDistanceMax plugin