fixing stats.events.valuemax and valuemin