Merge pull request #4704 from Razz4780/fix-agent-args