fix endless repaint in painting background component