Fixing malformed URLs