quantity error fix