fixed the js redirect