fix bug of process handling