Fix restarts bug