Fix quantity bug