fix with unhanldled error in main process