fixed bugs with statistic collection