updated generator shutdown