Fix another leak caused by a window.resize event