Dealing with resizing the window.