minor bug fix: Don't show totals of all events on detailed statistics template for a specific event

Show totals of that specific event instead
refactor complex method