Attempt to fix post repaint issue