fix tests of exceptions