Yea, the first few times I sold (shorted) a stock, I inadvertently sold more rather than buy back.
The safest way I've found is to select the buy/sell icon for the shorted stock, don't touch the quantity, then either buy 'at best' or buy at a determined value.
It could be a lot clearer. Maybe on the following screen, a line indicating what you will be left with should you accept the transaction, ie nothing, double the amount, too much the other way, etc.