Fix leaked window.