Fix import issues
Fix protocol issue when generating URL for backward compatibility