Fix UI glitch