fix bug with quantity