Fix purchases generation