Fixed error handling
Merge branch 'develop'