Fix positioning when a scrolled window is resized