Fixed some instances of resources being held on to