Fix hash metrics calculation.