fixed restart condition