fixed #2
fix cannot display error message
fix #1,#2
fix #4 and some bugs
Merge pull request #5 from unagi/development

fix some bugs and code style