Fix double-logging of exceptions.