Fixed issue #61. Fixed a bug that no error messages could be displayed