Fixed CME on server shutdown. Fixed NPE Mystcraft lightning. Fixes #1025

Fixes #1023