log statistic generation bug fixes