Fix URLs getting.
Update scripts to properly handle patch function.