fix bad error matrix