fix bug for error test