Server now restarts correctly