updated restartServer method