Remove the correct resize event listener on shutdown