repaint before dialog box take 2