Fix fatal error

fix exception code
Merge pull request #101 from gimler/patch-1

Fix fatal error