Fixed bug in URL build code.