fix to metric for hooking environment