minor fixes to metric reporting function