fixing JS typo that broke redirect