fixing resizing window