fix repaint error