cleanup + fixed global, uncaught-exception-handler.