A few small refinements to number replacement