fixed hanging bug on process cancel