Fixed potential issue when multiple orders/items are selected