Fix javascript issue with url