bugfix repaint