URL generation fix