fixes in agents and tasks