fixed repaint issue