fix cannot display error message
fix #1,#2