Fix lingering double-free