Solve program closing when changing an item with a long barcode.