fix a typo in Agent. Fixes issue #1