fixed js glitch