fix issue where empty metric is returned