fixing bug in url generator