fix for metrics and dim == 2