Fix worst of the resource handling