Realized there was a major bug where the price of an item was never stored at purchase, thus it only uses the current price, not the purchase price.