Minor fix for error rate calculation