Eliminate flicker on resize.