fix bug in detection of changes for statistic update