fixing code after metrics-core lib change