Fix restart issues