fixes some preview glitches