fix some resource fetching issues