Fix case where no resource is retrieved