Changed how text is drawn to avoid glitches