fix tests for exceptions