Fix glitches on touch devices