trying to fix js redirect