[bugfix] Fix a bug in error handling
Merge pull request #37 from SfietKonstantin/error-fix

[bugfix] Fix a bug in error handling