Made server restarting idempotent