handle cluster shutdown