fix on barcode function