Better error handling.
Merge branch 'dev'