ShutdownHandler fix