Fixed Server not exiting properly.