Fixed the receipt creation bug.