Reduce complexity of shutdown logic