Fix glitch in UI re-rendering.