Fix bug in metrics script.