fix bug when displaying stats