fixed stats page with initialize function