Fixed bug with url gen