Fixed: prevent negative quantity