Fixed a crash that happened when block throws an exception and an uncaught exception handler is registered