Add restart logic