Backport metrics fix 0.9