fix process state bug
termination protocol