Fixing tests, better error handling

:+1: