Unit test fixes
[Debug] Restoring error handler before assertions