resizing of the window more stable