fix the problem can not display error message