-ve cost basis in the paper account

I have been testing paper trading for about a year now with the paper account. This is the first time I see a -ve cost basis on my trades . I cannot calculate any additional data to trade if the average cost is -Ve. What could be the reason and how to fix it?

@pranay The issue is probably related to the fact that paper accounts do not implement most corporate actions. If you provide the account number and the specific position I may be able to provide more detail.

Dan, Thank you for your reply. My account # is PA32MJOBWWF1. The first time it happened, Isold all my holdings. then I re-bought 1 BTC and cost basis was +ve. Again after restarting the buy/sell bot, the cost basis went to -ve in Alpaca Positions tab, even though the main screen shows the correct progression with cash available at 26,600. Would appreciate your help to resolve this.