Fix server shutdown process.
Merge branch 'server' into tempShootFix