fix window redraw on close