Fix bug in Agent Spawner