Re-add closing of handles on destroy