Fixed bug in url generation.
Improved url generation.