fix metrics script