Fixes some glitches.