Fixed bug for urlGen.js