resolve quantity bug