fix stop bug with command line
Merge pull request #3 from ScottSWu/master

fix command line interface broken by gui stop