fix bug of getAvgCountOfEachEvent