fixed a sad mistake which causes the server to die during runagent
Merge pull request #955 from thepax/master

fixed a sad mistake which causes the server to die during runagent