fix some NBT crashes