Fixing placement of kpi parameter check.