Fixed error in AgentQueue class