Fix restart problem