shutdown sequence fixes