Fixes potential hang in startup (actor system was not being shut down in the event of startup failure).