fix redirect glitch