Fix the way addCatalogPages finds the stats element