correct instantiation of agent inside the scripts
fix
Merge pull request #1204 from fstagni/fixStuff

[FIX] Correct instantiation of agents inside few scripts