problems with CreateNewKeyDialog
Prevent another infinite loop because of a mismatching keycomment
alter shutdown procedure so that stoping the agent is the last possible thing to happen
Merge pull request #9 from l1ll1/master

as per launcher pull request