Fix for server shutdown.