Fix getResourceByUri for all methods