fix metrics integration