Handle unloading nicely