Fixed some typos and error handling
Merge pull request #3 from andremetzen/patch-1

Fixed some typos and error handling