stop/resume test, and some related fixes