fix bug when killing process