Yet more fixes to metrics collection