Assuming you had dividends reinvested, which accumulate fractional shares. When you sold, there may have been a round off error, leaving you with, for example, 0.000054321 shares, which will print as 0. I forget how I finally figured out what the roundoff amount was, or maybe I went back and made all of the transactions have a known 3-digit fraction so the math worked better.