Fixed exceptions
Merge pull request #1 from edwines/master

Fixed exceptions