checked-version with correct_restart function