fixes to agents and groups