A,? If it's in your paper account, welcome to IB..
If it's production, check that the contractID is the same, and the exchange is right (SMART, or whatever came on the Position record itself). If IB were to think it was a different security, your sell would be from a basis of 0 making it a short.
Otherwise report it IB, and send in your logs.
-Peter