Added repaint. It still has flickering.