fixed error with agent_id