fix bugs of statistics