fix bug for Errors