fix update quantity bug