multiple fixes to the custom metrics collection facilities