fix stop code for opensource ptap