Make sure resources are given back, deadlock potential. (I've seen it
deadlock, not sure this fixes it.)