Added repaint and reflow