Proper flag for uncaught exceptions

fixed