fix #2730: avoid exceptions with barcode scanner