Fix bug with using barcodes