Added Url formatting to ensure the url is valid