Make restart conditional