Fixed error with buying, selling, and rebuying.