Fix test error with ShutdownHandler