fix abstract metric unittest and along with it some bugs in the new abstarctmetric code