Fixed bug in URL assembly