fix bug when call subprocess