Merge pull request #1 from sharkmandan/master

fixed an error in the example
return when error is occurs