Some changes with statistics calculation