add shutdown code to all statics