fix mistake in kpi calculation