HCOLL-77 improved the shutdown code