Fix bug in URL generation.