Added redraw during window resizing to prevent flicker