Fixes some display glitches