Fix error handling.
Fix error handling.
Merge pull request #86 from matejonnet/master

Fix error handling.