fix bug with total statistics