fixed bug in resource URL fetching