inventory: Fix error when sending inventory