additional error handling
Merge pull request #1020 from achamely/master

Missed Additional error handling