Merge pull request #113 from glenwks/master

Error catching fix