wrong key used for retrieving agent name
Merge pull request #1 from neilbowers/master

bugfix: wrong key used when getting agent name