Fix errors in reading and fetching the ItemStack[]