Fixed LifecycleService.shutdown() deadlock.