fix quantity bug