Fermionic string perturbation theory is known to suffer from an ambiguity in the form of a total derivative in the moduli space. For a class of backgrounds (including R10, orbifolds and theories with no U(1) factors in gauge group) we show that these ambiguities for the partition function of heterotic string theory at any genus are proportional to massless physical tadpoles in the theory at lower genera and hence vanish in stable vacua. We also find that in R10 the cosmological constant at a given genus is proportional to the cosmological constant at lower genera. This enables us to give an inductive argument for the vanishing of the cosmological constant in R10 to all orders in string perturbation theory. We also address the ambiguity and ...