simplified the termination procedure
Merge pull request #1 from DaikiMaekawa/simple

simplified the termination procedure