inventory: fix item cast