Fixed Excepton handling
Merge pull request #100 from sashakruglov/Exception_handling_fix

Fixed Excepton handling