Fixing argument order when updating an agent.