Fix inventory issues when using primary ItemStack