fix window-resizing