Resource management fix