Properly dealing with life-time of WebWorker and added a flag for controlling whether async callback is executed.