fixed a bug that error in console mode occurs application error