Removed unnecessary call to repaint.