Fix in agentcontrol