Fix shutdown criteria.