Fixed bug in MetricCollector where the upper metric bucket ID was incorrectly calculated.