Fix statistics calculator while adding custom cells