ensure cleanup actually happens on shutdown.