If there was a SHORT Position with a Significant LOSS (Negative number under 'Value' on the Portfolio Page), Covering would produce Negative Cash.
Also, the HSX Software sometimes erroneously hammers through Double (or more) Transactions. Please check your Trade History to see what caused the situation.