Server: Fixed segfault at exit

Fixed deinitialization order of services in the server node