fix NPE when InventoryChanged is called from readFromNBT