Replenishment fix

Some tuning to the stock replenishment feature.