Fixed a bug if the quantity to sell was greater than one.