Fixed url formatting and encoding