A call to fix the BeginPaint issue