fix issue #1798: commands fail after stopping and relaunching app.

Classic