Fix matching and processing of inventories