trying to solve glitches