Rework on purchase logic.