fixed total error so that zero predictions are counted correctly