fix gen url code