corrected an error in the periodic counters