Removing malformed URLs