fixed bug in url generation