Fixed an issue with the headless server not saving the world on shutdown.