fix: Close resources we no longer need