updateAgentParameters() copies the params over to ag->params, use ag->params.queryFilterType, instead of duplicating the var.