Fix UI layout glitches