Restart the server properly