Stock was Filled but then Canceled and qty was not refunded for short selling

I was trying to short sell a stock. Therefore, I bought a stock when the price was going down from the price I sold it at and it was immediate or cancel order probably during the closing time of the market. As I ordered the order was filled successfully and I was in profit margin. But later when I opened the dashboard after a day that order were canceled and I am in negative profit margin. Also I ordered 4 different buy orders for the stock that I was shorting two of them were filled but two were canceled and of those canceled the stock quantity were also not refunded but somehow my buying power went too high.

@krishpatel The best way to handle account specific question on trade execution are by contacting Ensure you include your account number and/or the email associated with the account. Include specific order numbers if you are questioning how they were, or were not filled.

That said, is there a general question you were asking about how orders are filled and how open orders impact buying power?