fixed bug in successive URL generation