Bug fix in resource fetching