Fixing restart conditions