fix metrics update