fixing bugs with optimization fragment refresh and quantity updates