bug fixed that was miscalculating error rates to negative value