Fixed uncaught exception handeler