fix in function replace_resource_urls call