Updated terminate script to handle wrong server id.
merged into master branch.