fixed issue with exception handling while multithreading (including async)