fix stat.where in metric.rb