Just close it as much as the profit was made from the long position and reduce the margin of your short trade to avoid liquidation.