should avoid NPE, when standalone server is stopping.
Merge pull request #88 from realbeast/feature/avoidnpe

Should avoid NPE, when standalone server is stopping.