fixed errorrate metric bug