fixing metric recording issues