Fix JS locale redirection