So this appears to only happen in this scenario:
/sell 20 stone 1
/cancel stone 20
=0 items in /stock
So if you cancel the full amount you have available to sell it results in a 0 stock: But if you do this:
/sell 20 stone 1
/cancel stone
= No items in /stock
Using /cancel with no amount will cancel all of the items you sell without leaving them with a placeholder of 0 in the stock.