fix bug in metricvalue, retval not initialized.