InventoryState segfault fix