Corrected agentSet issue