Fixed resource closing