Repaint bug fixed