fix the metric condition error