fix some possible bugs in barcode list generation