fixed a small bug in allocating number of entries in self.stats