Fix problem with version dependency

Apparently versions of 4.0 do not satisfy a dependency on 4.0.0
Fix bug introduced by changed behavior in 4.0
Have reasonable behavior on stop if REPL process dies unexpectedly