pe/fold-all saves state correctly