fixed error computation