fix js glitch