Fix another resource leak in the StatsManager