Fixed bugs of evaluation of errors.