better cleanup on shutdown/uninstall