fix window resizing