Fixing leak in options.agent

Fixes #51