fixing error rate math