small fixes to barcode scanning